package com.lch.designpattern.prototype.simple;

import java.util.List;

import lombok.Data;

/**
 * @author: liuchenhui
 * @create: 2019-04-17 22:50
 **/
@Data
public class ConcretePrototypeA implements Prototype {

    private String name;
    private String age;
    private List hobbies;

    @Override
    public Prototype clone() {
        ConcretePrototypeA concretePrototypeA = new ConcretePrototypeA();
        concretePrototypeA.setAge(this.age);
        concretePrototypeA.setHobbies(this.hobbies);
        concretePrototypeA.setName(this.name);
        return concretePrototypeA;
    }
}
